<%inherit file="/base.html"/>

<%def name="main_heading()">
	${c.timesheet.office},
	${h.month_name(c.timesheet.month, width='wide')}
	${c.timesheet.year}
</%def>

<%def name="content()">

<h4>
	<a href="${url(controller='worktime/offices', action='office', id=c.timesheet.office.id)}">&lt;&lt; ${_('Back to the office')}</a>
	|
	<a href="${url.current(action='pdf')}">${_('Save')}</a>
</h4>

<div class="paginator">${c.employees.pager()}</div>
<table class="data-table" style="width:100%;font-size:0.8em;">
	% for employee in c.employees:
	<tr>
		<td colspan="${c.days_in_month}">
			<table class="full-width no-border">
				<tr>
					<td style="width:64px">
						<code style="color:#A0522D">${employee.number or '-' * 8}</code>
					</td>
					<td>
						<h4>
							<a href="${h.url_gen(action='edit', id=c.timesheet.id, record_id=employee.id)}">${employee.employee}</a>
						</h4>
					</td>
					<td class="right-aligned">
						<code>${employee.salary or '0.00'}</code> |
						<a style="font-weight:normal;" class="crud-action edit" href="${url.current(action='calendar', record_id=employee.id)}">${_('edit')}</a> |
						<a style="font-weight:normal;" class="crud-action delete" href="${url.current(action='delete', record_id=employee.id)}">${_('delete')}</a>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		% for day in employee.days:
		<th>${day.day}</th>
		% endfor
	</tr>
	<tr>
		% for day in employee.days:
		<td class="center-aligned">${day.code}</td>
		% endfor
	</tr>
	<tr>
		% for day in employee.days:
		<td class="center-aligned">${day.hours}</td>
		% endfor
	</tr>
	% endfor
</table>
<div class="paginator">${c.employees.pager()}</div>

</%def>